//
//  Re_PeopleTableViewCell.m
//  海角音乐
//
//  Created by dllo on 15/8/18.
//  Copyright (c) 2015年 杨元石. All rights reserved.
//

#import "Re_PeopleTableViewCell.h"

@implementation Re_PeopleTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        [self setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
        
        self.backgroundColor = [UIColor clearColor];
        
        CGFloat height = 170*ADJUSTWIDTH; // 150
        CGFloat X = SCREEN_WIDTH*0.026666667; // 10
        _imageView = [[UIImageView alloc] initWithFrame:CGRectMake(X, X, SCREEN_WIDTH-2*X, height)];
        [self.contentView addSubview:_imageView];
        [_imageView release];
        
        
        CGFloat size = SCREEN_WIDTH*0.1333333; // 50        
        _playButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _playButton.frame = CGRectMake(0, 0, size, size);
        [_playButton setBackgroundImage:[UIImage imageNamed:@"iconfont-bofang-3.png"]
                               forState:UIControlStateNormal];
        [_playButton setCenter:CGPointMake(_imageView.frame.size.width/2, _imageView.frame.size.height/2)];
        [_imageView addSubview:_playButton];
        

        
    }
    
    return self;
}

- (void)getDataForImage:(NSDictionary *)dic
{
    
    [_imageView sd_setImageWithURL:[NSURL URLWithString:[dic objectForKeyedSubscript:@"pic_url"]] placeholderImage:[UIImage imageNamed:@"placeholder"]];
    
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
